var viewer = new Cesium.Viewer('cesiumContainer',{
    infoBox: false,
    orderIndependentTranslucency: false,
    imageryProvider:new Cesium.MapboxStyleImageryProvider({
        url:'https://api.mapbox.com/styles/v1/',
        username:'jimbozhu',
        styleId: 'ckfcq9pz93sqy19rwpst6wzks',
        accessToken: 'pk.eyJ1IjoiamltYm96aHUiLCJhIjoiY2sxMXNkbzFmMGszOTNocDJmbWdpcndiNSJ9.R-M1MZCR6kKj8MCEPbrDEA',
        credit:'MapBox',
    })
})

viewer.scene.open(SYS.coloredSceneUrl).then((layers)=>{
    var ids = get_arr(0, 2000);
    var offsetZ1 = -20;
    var layer_lower = viewer.scene.layers.find("F0@听海大道地下空间20201016#1");
    var layer_upper = viewer.scene.layers.find("F1@听海大道地下空间20201016");
    layer_upper.selectedTranslate = new Cesium.Cartesian3(0,0, offsetZ1);
    layer_upper.setObjsOffset(ids)
    layer_lower.selectedTranslate = new Cesium.Cartesian3(0,0, offsetZ1);
    layer_lower.setObjsOffset(ids)
});

function get_arr(starer, n) {
    var ret_arr = [];
    for (var i = starer; i < starer + n + 1; i++) {
        ret_arr.push(i);
    }
    return ret_arr;
}; 